﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using eschoolBO;

namespace ESCHOOL
{
    public partial class WebForm2 : System.Web.UI.Page
    {
        bannerslide bs = new bannerslide();
        static int i = 0;
        protected void Page_Load(object sender, EventArgs e)
        {

        }

               protected void Timer1_Tick(object sender, EventArgs e)
               {
                   DataTable dt = bs.GetRecords(-99, "", "", "Slideshow", "true", false, " and ");
                   //for (int i = 0; i < dt.Rows.Count; i++)

                   Image1.ImageUrl = "~/admin/banner/" + dt.Rows[i]["b_image"].ToString();
                   int j = dt.Rows.Count;
                   i++;
                   if (i == j)
                       i = 0;
               }

    }
}
